package common.spring.auditlog.dao;

import common.spring.auditlog.annotation.AuditAction;
import common.spring.auditlog.common.enums.Action;
import common.spring.auditlog.entity.DeviceSensor;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface DeviceSensorDao {
    DeviceSensor selectByPrimaryKey(Long id);

    @AuditAction(action = Action.ADD, targetTable = "device_sensor")
    int insert(DeviceSensor record);
    @AuditAction(action = Action.ADD, targetTable = "device_sensor")
    int insertSelective(DeviceSensor record);

    @AuditAction(action = Action.UPDATE, targetTable = "device_sensor")
    int updateByPrimaryKeySelective(DeviceSensor record);
    @AuditAction(action = Action.UPDATE, targetTable = "device_sensor")
    int updateByPrimaryKey(DeviceSensor record);

    @AuditAction(action = Action.DELETE, targetTable = "device_sensor")
    int deleteByPrimaryKey(Long id);
}